const RoleObj = require('../modules/Rules');

let RoleController = {

    //添加角色
    post_addRole: async function(req, res) {
        let roleName = '';
        if (req.body.roleVal) {
            roleName = req.body.roleVal;
        }
        if (roleName == '') {
            return;
        }
        await RoleObj.add_role(roleName);
        res.send({
            code: 200,
            msg: '添加成功'
        })
    },
}

module.exports = RoleController;